// const prefix = 'http://192.168.0.108:1012/api/app/vote';
const prefix = 'https://yqyd-api.yaojunzhiku.com/api/app/vote';

const List = async (UUID) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: prefix + '/List/' + UUID,
			method: 'GET',
			success: (res) => {
				resolve(res.data)
			}
		});
	})
}


const Add = async (data) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: prefix + '/Add',
			method: 'POST',
			data,
			success: (res) => {
				resolve(res.data)
			}
		});
	})
}

export default {
	List,
	Add
}